/*
 * @Author: Starfish_DL
 * @Date: 2020-10-07 21:05:46
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-08 00:42:59
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class Student extends Person{
    protected String school="Peking University";
    private long number;
    private int math;
    private int english;
    private int computer;
    public String getInfo() {
        return  "Name: "+ name + "\nage: "+ age + "\nschool: "+ school;
    }
    public Student(String n,char s,int a,long k,int m,int e,int c) {
        super(n, a, s);
        this.computer=c;
        this.english=e;
        this.math=m;
        this.number=k;
    }
    public double aver() {
        return (this.computer+this.english+this.math)/3;
    }
    public int max() {
        int maxTemp=0;
        if (this.computer>=this.english) {
            maxTemp=this.computer;
        } else {
            maxTemp=this.english;
        }
        if (maxTemp>=this.math) {
            return maxTemp;
        } else {
            return this.math;
        }
    }
    public int min() {
        int minTemp=0;
        if (this.computer<=this.english) {
            minTemp=this.computer;
        } else {
            minTemp=this.english;
        }
        if (minTemp<=this.math) {
            return minTemp;
        } else {
            return this.math;
        }
    }
}
